﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GestionDeCinebox.Classes
{
    public class EmailChecking
    {
        public bool checkFormat(String email)
        {
            string strPattern = "^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$";
            if (System.Text.RegularExpressions.Regex.IsMatch(email, strPattern))
            {
                return true; 
            }

            return false;
        }
    }
}
